<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input oninput="calc()" id="input1" type="number" value="1"/>
		+
		<input oninput="calc()" id="input2" type="number" value="1"/>
		=
		<span> 2 </span>
	</body>
	<script>
		var input1 = document.getElementById("input1")
		var input2 = document.getElementById("input2");
		var span = document.querySelector("span");
		function calc(){
			span.textContent = input1.value*1 + input2.value*1
		}
	</script>
</html>
